<template>
	<view class="content">
		<text class="success-icon yticon icon-xuanzhong2"></text>
		<text class="tit">支付成功!</text>
		
		<view class="btn-group">
			<navigator open-type="redirect" class="mix-btn tn-cool-bg-color-15--reverse" @click="toOrder()">查看订单</navigator>
			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
		</view>
		<view class="" style="margin-top: 60rpx;display: flex;align-items: center;flex-direction: column;">
			<view class="" style="font-size: 40rpx;font-weight: bold;margin: 0 90rpx;">
				请及时加入食小助售后服务群,售后问题将在群里沟通解决!
			</view>
			<view class="btn-group">
				<navigator url="/pages/huoma/huoma" class="mix-btn tn-cool-bg-color-15--reverse">点击加群</navigator>
			</view>
		</view>
		<!-- <u-steps :list="numList" style="margin-top:50rpx;" :current="4"></u-steps> -->
		<!-- 通过 ref 为子组件赋予一个 ID 引用,访问子组件实例 -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				numList: [{
					name: '点击支付'
				}, {
					name: '成功付款'
				}, {
					name: '点击按钮'
				}, {
					name: '跳回网站'
				}, {
					name: '订单显示'
				}, ],
			}
		},
		onLoad(option) {
			if(option.sn!=undefined){
				that.sn = option.sn
				if(option.sn=="1"){
					uni.showModal({
						title:"恭喜您抽到了中南大学卡套",
						success() {
							return
						}
					})
				}else if(option.sn=="2"){
					uni.showModal({
						title:"恭喜您抽到了中南大学流沙摆件",
						success() {
							return
						}
					})
				}else if(option.sn=="3"){
					uni.showModal({
						title:"恭喜您抽到了中南大学签字笔",
						success() {
							return
						}
					})
				}else{
					uni.showModal({
						title:"恭喜您抽到了中南大学戒指",
						success() {
							return
						}
					})
				}
			}
		},
		methods: {
			preview(url){
				uni.previewImage({
					urls:[url],
					current:0
				})
			},
			toOrder() {
				uni.switchTab({
					url: 'order'
				})
			}
		}
	}
</script>

<style lang='scss'>
	.content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.success-icon {
		font-size: 160upx;
		color: #fa436a;
		margin-top: 100upx;
	}

	.tit {
		font-size: 80upx;
		color: #0000ff;
		font-weight: bold;
	}

	.btn-group {
		display: flex;
		flex-direction: column;
		align-items: center;
		/* padding-top: 100upx; */
	}

	.mix-btn {
		margin-top: 30upx;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 600upx;
		height: 80upx;
		font-size: $font-lg;
		color: #fff;
		background-color: $base-color;
		border-radius: 10upx;

		&.hollow {
			background: #fff;
			color: #303133;
			border: 1px solid #ccc;
		}
	}
</style>
